import request from '@/utils/request'
import scope from './scope'
const apiPrefix = `${process.env.VUE_APP_BASE_API}/${scope}/xbctype/`

// 物料类型管理
export const getXbcType = (params, config = {}) => {
  return request.get(apiPrefix + 'get', { params: params }, config)
}

// 获取物料分类的配置
export const getXbcTypeConf = (params, config = {}) => {
  return request.get(apiPrefix + 'getconf', { params: params }, config)
}

export const getXbcTypeListPage = (params, config = {}) => {
  params = params || {}
  return request.post(apiPrefix + 'getpage', params, config)
}
export const addXbcType = (params, config = {}) => {
  return request.post(apiPrefix + 'add', params, config)
}
export const editXbcType = (params, config = {}) => {
  return request.put(apiPrefix + 'update', params, config)
}
export const removeXbcType = (params, config = {}) => {
  return request.delete(apiPrefix + 'softdelete', { params: params }, config)
}
export const batchRemoveXbcType = (params, config = {}) => {
  return request.put(apiPrefix + 'BatchsoftDelete', params, config)
}
export const getxbcTypeList = (params, config = {}) => {
  return request.get(apiPrefix + 'getxbclist', { params: params }, config)
}
